package com.easonji.common.constant.dictmap;

import com.easonji.common.constant.dictmap.base.AbstractDictMap;

/**
 * @ClassName: PermissionDict
 * @Description: 权限的字典（记录日志AOP用）
 * @Author: LiuJun
 * @date: 2018/07/12 14:37
 * @Version: 1.0
 * @Copyright: Copyright (c) 2018 - 2019
 */
public class PermissionDict extends AbstractDictMap {

    @Override
    public void init() {
        put("permissionId", "权限ID");
        put("appId", "应用名称");
        put("parentId", "父权限名称");
        put("name", "权限名称");
        put("isMenu", "是否是菜单");
        put("icon", "权限图标");
        put("url", "url地址");
        put("num", "权限排序");
    }

    @Override
    protected void initBeWrapped() {
        putFieldWrapperMethodName("isMenu", "ConstsFactory.getIsMenuName");
        putFieldWrapperMethodName("permissionId", "PermissionManager.getPermissionNameById");
        putFieldWrapperMethodName("parentId", "PermissionManager.getPermissionNameById");
        putFieldWrapperMethodName("appId", "AppManager.getAppNameById");
    }
}
